package org.monkey.socket.plugin.entity;

import cn.hutool.json.JSONUtil;
import java.io.Serializable;
import lombok.Data;
import lombok.ToString;
import org.monkey.common.constant.config.CommonConstant;
import org.monkey.common.constant.util.BaseMsg;

@Data
@ToString
public class SocketMsg extends BaseMsg implements Serializable {

  private String channelId;
  private boolean readStatus = false;


  public static void main(String[] args) {
    SocketMsg socketMsg = new SocketMsg();
    socketMsg.setChannel("orderCancel");
    socketMsg.setChannelGroup("order");
    socketMsg.setMsg("C20220901000001");
    socketMsg.setMsgType("application/text");
    socketMsg.setNamespace(CommonConstant.DEFAULT_SOCKET_NAMESPACE);
    socketMsg.setFrom("system");
    socketMsg.setTo("111");
    System.out.println(JSONUtil.toJsonStr(socketMsg));
  }
}
